home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Development Tools & Languages / Dylan Related / Mindy-1.1 (sources only) / mindy-1.1 / interp / func.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-28  |  4.0 KB  |  103 lines  |  [TEXT/ttxt]

  1. /**********************************************************************\
  2. *
  3. *  Copyright (c) 1994  Carnegie Mellon University
  4. *  All rights reserved.
  5. *  
  6. *  Use and copying of this software and preparation of derivative
  7. *  works based on this software are permitted, including commercial
  8. *  use, provided that the following conditions are observed:
  9. *  
  10. *  1. This copyright notice must be retained in full on any copies
  11. *     and on appropriate parts of any derivative works.
  12. *  2. Documentation (paper or online) accompanying any system that
  13. *     incorporates this software, or any part of it, must acknowledge
  14. *     the contribution of the Gwydion Project at Carnegie Mellon
  15. *     University.
  16. *  
  17. *  This software is made available "as is".  Neither the authors nor
  18. *  Carnegie Mellon University make any warranty about the software,
  19. *  its performance, or its conformity to any specification.
  20. *  
  21. *  Bug reports, questions, comments, and suggestions should be sent by
  22. *  E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  23. *
  24. ***********************************************************************
  25. *
  26. * $Header: func.h,v 1.9 94/06/27 16:31:54 wlott Exp $
  27. *
  28. \**********************************************************************/
  29.  
  30.  
  31. extern obj_t obj_FunctionClass;
  32. extern obj_t obj_MethodInfoClass;
  33. extern obj_t obj_MethodClass;
  34. extern obj_t obj_ByteMethodClass;
  35. extern obj_t obj_GFClass;
  36.  
  37. struct method_info {
  38.     obj_t class;
  39.     boolean restp;
  40.     obj_t keys;
  41.     boolean all_keys;
  42.     obj_t component;
  43.     int n_closure_vars;
  44. };
  45.  
  46. #define METHOD_INFO(o) obj_ptr(struct method_info *, o)
  47.  
  48. extern obj_t make_raw_function(char *debug_name, int required_args,
  49.                    boolean restp, obj_t keywords, boolean all_keys,
  50.                    obj_t result_types, obj_t more_results_type,
  51.                    void xep(struct thread *thread, int nargs));
  52.  
  53. extern obj_t make_raw_method(char *debug_name, obj_t specializers,
  54.                  boolean restp, obj_t keywords, boolean all_keys,
  55.                  obj_t result_types, obj_t more_results_type,
  56.                  void iep(obj_t self, struct thread *thread,
  57.                       obj_t *args));
  58. extern void set_method_iep(obj_t method,
  59.                void iep(obj_t self, struct thread *thread,
  60.                     obj_t *args));
  61. extern obj_t make_builtin_method(char *debug_name, obj_t specializers,
  62.                  boolean restp, obj_t keys, boolean all_keys,
  63.                  obj_t result_type, obj_t func());
  64. extern obj_t make_method_info(boolean rest_p, obj_t keys, boolean all_keys,
  65.                   obj_t component, int n_closure_vars);
  66. extern obj_t make_byte_method(obj_t method_info, obj_t specializers,
  67.                   obj_t result_types, obj_t more_results_type,
  68.                   obj_t *lexenv);
  69. extern obj_t byte_method_component(obj_t byte_method);
  70.  
  71. extern obj_t make_accessor_method(obj_t debug_name, obj_t class, obj_t type,
  72.                   boolean setter, obj_t datum,
  73.                   void iep(obj_t self, struct thread *thread,
  74.                        obj_t *args));
  75. extern obj_t accessor_method_datum(obj_t method);
  76. extern void set_accessor_method_datum(obj_t method, obj_t datum);
  77.  
  78. extern obj_t make_generic_function(obj_t debug_name, int required_args,
  79.                    boolean restp, obj_t keys, boolean all_keys,
  80.                    obj_t result_types,obj_t more_results_type);
  81. extern obj_t make_default_generic_function(obj_t debug_name, obj_t method);
  82. extern void set_gf_signature(obj_t gf, int req_args, boolean restp,
  83.                  obj_t keys, boolean all_keys, obj_t result_types,
  84.                  obj_t more_results_type);
  85.  
  86. extern obj_t generic_function_methods(obj_t gf);
  87. extern obj_t add_method(obj_t gf, obj_t method);
  88.  
  89. extern void invoke(struct thread *thread, int nargs);
  90. extern obj_t *push_linkage(struct thread *thread, obj_t *args);
  91. extern void set_c_continuation(struct thread *thread,
  92.                    void cont(struct thread *thread, obj_t *vals));
  93. extern obj_t *pop_linkage(struct thread *thread);
  94. #if SLOW_LONGJMP
  95. #define do_return do_return_setup
  96. #else
  97. extern void do_return(struct thread *thread, obj_t *old_sp, obj_t *vals);
  98. #endif
  99. extern void do_return_setup(struct thread *thread, obj_t *old_sp, obj_t *vals);
  100.  
  101. extern obj_t function_debug_name(obj_t func);
  102. extern obj_t function_debug_name_or_self(obj_t func);
  103.